<?php
defined('_JEXEC') or die('Direct Access to this location is not allowed.');

class ModTweetThisHelper
{
	public function shortenUrl()
	{
		$shortenUrl=JURI::getInstance()->toString();
				
		return $shortenUrl;
	}
	
	public function docTitle()
	{
		$mydoc =& JFactory::getDocument();
		$docTitle = $mydoc->getTitle();
		
		return $docTitle;
	}
	
	public function hash($tags)
	{
		$hashTags = '';
		$tags = preg_replace('/[[:space:]]/', '', $tags);
		if(strlen($tags)){
			$hashTags = '#'.str_replace(',',' #', $tags);
		}
		
		return $hashTags;
	}
} // end ModTweetThisHelper